import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [{
        path: '/',
        component: () => import("../view/Home.vue")
    },
    {
        path: '/home',
        name: 'Home',
        component: () => import('../view/Home.vue')
    },
    {
        path: '/blog',
        component: () => import("../view/Blog.vue"),
        children: [{
                path: 'articleList',

                component: () => import('../components/ArticleList.vue')
            },
            {
                path: 'addArticle',

                component: () => import('../components/AddArticle.vue')
            },
            {
                path: 'about',

                component: () => import('../components/About.vue')
            },
        ]
    },

]

const router = new VueRouter({
    routes
})
export default router